#include "colors.inc" #include "golds.inc" #include "metals.inc" #include "woods.inc" #include "transforms.inc" #include "shapes.inc" #include "math.inc" #include "glass.inc" #include "stones.inc" #include "textures.inc" // create a Surface of Revolution shape (like lathe, but faster) sor { 7, // # of points <0.0, 0.0> // list of points that will be "spun" around y-axis <0.1, 0.0> <0.6, 0.5> <0.2, 0.8> <0.2, 0.96> <0.28, 1.0> <0.47, 1.1> // [open] pigment {color rgbf<1,1,0,.5>} translate <2,0,2> } object { difference //show an internal "face" of a fractal (note: a plane has an "inside" & "outside") { plane {y, -.1 pigment{rgbf<.5,0,1,.8>}} //a 4-Dimensional object shown as a 3-D graph and a 2-D slice // create a 3-D slice of a 4-D julia fractal object // does it look like mountains? julia_fractal { <-0.083,0.0,-0.83,-0.025> quaternion //hypercomplex cube // TYPE: sqr | cube | exp | reciprocal | sin | asin | sinh | asinh | cos | acos | // cosh | acosh | tan | atan | tanh | atanh | log | pwr( X_Val, Y_Val ) max_iteration 20 precision 20 slice <0,0,0,1>,0 pigment {color rgbf<1,0,0,.5>} //translate<-4+2.5*n,0,0> } } rotate <0,0,0> // can rotate to see the "face" of the fractal better scale 3*<1,1,1> // make it bigger } // the rest is from previous assignments light_source { <1, 1, 1> color rgb <1,1,1> } light_source { <-1,3,-5> color rgb <1,1,1> } light_source { <1,4,0> color rgb <1,1,1> } light_source { <-1,5,2> color rgb <1,1,1> } camera {location <1.0, 3.0, -5.0> look_at <0, 0, 0>} cylinder {<-10, 0, 0>,<10, 0, 0>, 0.1 pigment {color Red}} cylinder {<0, -10, 0>,<0, 10, 0>, 0.1 pigment {color Green}} cylinder {<0, 0, -10>,<0, 0, 10>, 0.1 pigment {color Blue}} plane {y, -2 pigment {White}} // after generating the first image, try "zooming in" on an edge of the fractal by moving the camera